<!--{include header}-->

<div id="bdw" class="bdw">

	<div id="main-outer" class="main-outer">
		<div class="main-border-t">
			<div>
			</div>
		</div>
		<div class="main-border-b">
			<div>
			</div>
		</div>
		<div class="main-inner clearfix">
			<h2 class="coupon-heading">
				{$city['name']}
			</h2>
			<!--{if $login_user}-->
			<div class="logins">
				<ul id="account">
					<li class="username">欢迎您，{$login_user['username']}！</li>
					<li class="account"><a href="/order/index.php" id="myaccount" class="account">我的{$INI['system']['abbreviation']}</a></li>
					<li class="account"><a href="/account/sync.php">同步设置</a></li>
					<li class="logout"><a href="/account/logout.php">退出</a></li>
				</ul>
			</div>
			<!--{else}-->
			<div class="logins">
				<ul id="account">
					<li class="login"><a href="/account/login.php">登录</a></li>
					<li class="signup"><a href="/account/signup.php">注册</a></li>
				</ul>
			</div>
			<!--{/if}-->
			<!--<p class="coupon-hotcity">
				<span class="title">
					热门城市
				</span>
				<a href="/digu_shop/456">
					深圳
				</a>
				<a href="/digu_shop/455">
					广州
				</a>
				<a href="/digu_shop/1">
					北京
				</a>
				<a href="/digu_shop/3">
					上海
				</a>
			</p>-->
			<div id="JS_Map" class="shop-map">
			</div>			
			<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false">
			</script>
			<script src="/static/js/dg/shopmap.js">
			</script>
			<script>
				$(document).ready(function() {
					$.ShopMap.initMap('JS_Map');
					//$.ShopMap.load('ajaxData/mapForShop.jsp');
				});
			</script>
			<div class="main-content">
				<div class="cpsBG clearfix">
					<div class="pageTop">
						<div class="page">						
							<h3>限时优惠</h3>
							<span>每天早上10点新活动上线</span>
						</div>
						<div>{$pagestring}</div>
					</div>
					<!--{loop $teams $index $one}-->
					<div class="cp ${$index%2==0?'':'clipped'}" style="cursor: hand; cursor: pointer;">
						<p class="badge">
							{$one['discount_rate']}{$currency}
						</p>
						<div class="prodWrap">
							<a href="/team.php?id={$one['id']}" title="{$one['title']}" target="_blank">
								<img class="ci_css_img" src="${team_image($one['partner']['logo'])}" alt="{$one['partner']['title']}">
							</a>
							<div class="prodTxt">
								<a href="/team.php?id={$one['id']}" title="{$one['title']}" target="_blank">
									<h3>{$one['min_discount']}{$currency} ~ {$one['max_discount']}{$currency}</h3>
									<h4>{$one['partner']['title']}</h4>
								</a>
								<p>
									<a href="/team.php?id={$one['id']}" title="{$one['title']}" target="_blank">
										{$one['title']}
									</a>
								</p>
							</div>
						</div> 
						<!--<div class="bar">
							<p class="join_num_and_end_time">
								<span class="join_number">{$one['now_number']}人已参加</span>
								<span class="end_time">${date('Y-m-d',$one['end_time'])}截止</span>
							</p>
							<p class="left_time_p" countdown="{$one['end_time']-time()}" style="display:none;">
								<span class="time countdowner" countdown="{$one['end_time']-time()}" beforetoday="${floor(((time()-$one['begin_time']) / 3600) / 24)}">
								</span>
							</p>
							<a href="/team.php?id={$one['id']}" target="_blank">
								<p class="clip" style="display:none;"></p>
							</a>
						</div>-->
					</div>
					<!--{/loop}-->
				</div>
				<div class="pageBtm">
					<div>{$pagestring}</div>
					<div class="page">
						<p></p>
					</div>
				</div>
				<script type="text/javascript">
					var count_down_str = function(t){
						var m = Math.floor((t / 60) % 60).toString();
						var h = Math.floor((t / 3600) % 24).toString();
						var d = Math.floor((t / 3600) / 24).toString();
						return '还有 <span class="red">' + d + '</span>天<span class="red">' + h + '</span>小时<span class="red">' + m + '</span>分';
					};
					$(".countdowner").each(function(){
						var elem = this;
						var cntdown = function(total, beforetoday){
							if (total > 0){
								var msg = (beforetoday > 0) ? beforetoday + "天前开始，": "今天开始，";
								$(elem).html(msg + count_down_str(total));
								total = total - 60;
								setTimeout(function(){
									cntdown(total, beforetoday);
								},60000);
							} else{
								$(elem).html("活动已结束");
							}
						}
						cntdown($(this).attr("countdown"), $(this).attr("beforetoday"));
					});
					$(".cp").mouseover(function() {
						$(this).find(".join_num_and_end_time").hide();
						$(this).find(".left_time_p").show();
						$(this).find(".clip").show();
					}).mouseout(function() {
						$(this).find(".join_num_and_end_time").show();
						$(this).find(".left_time_p").hide();
						$(this).find(".clip").hide();
					});
					$(".cpWide").mouseover(function() {
						$(this).find(".join_num_and_end_time").hide();
						$(this).find(".left_time_p").show();
						$(this).find(".clip").show();
					}).mouseout(function() {
						$(this).find(".join_num_and_end_time").show();
						$(this).find(".left_time_p").hide();
						$(this).find(".clip").hide();
					});
				</script>
			</div>
			<div class="dg-side">
				<div class="side-my-property">
					<div class="side-my-property-inner">
						<!--<a href="/zombie321">
							<img class="photo" src="file/default/SIGN_39_48x48.jpg" alt="" />
						</a>-->
						<p class="level">
							网络影响力:
							<span class="num">
								<a href="/account/sync.php">
									{$user_network_weights["total"]}
								</a>
							</span>
						</p>
						<p class="point">
							拉普拉积分：
							<span class="num">
								0
							</span>
						</p>
					</div>
				</div>
				<div class="side-part side-part-first">
					<div class="side-heading">
						<h3>
							下期优惠
						</h3>
					</div>
					<!--{loop $teams $index $one}-->
					<ul class="side-coupon-list">
						<li>
							<img class="coupon-icon" width="48px" height="48px" src="${team_image($one['image'])}" alt="{$one['title']}">
							<a class="coupon-name" href="/team.php?id={$one['id']}" title="{$one['title']}" target="_blank">
								{$one['title']}
							</a>
							<br>
							<a href="/team.php?id={$one['id']}" title="{$one['partner']['title']}" target="_blank">
								{$one['partner']['title']}
							</a>
						</li>
					</ul>					
					<!--{/loop}-->
				</div>
				<div class="side-part">
					<div class="side-heading">
						<h3>
							火热活动
						</h3>
						<!--<a href="activities" target="_blank">
							查看全部活动
						</a>-->
					</div>
					<ul class="home-adver-list">
						<li>
							<a href="http://blog.digu.com:8080/?p=2351" target="_blank" title="麦乐团总动员">
								<img src="http://pic.digu.com:80/file/11/31/73/73/default/sysNotice_11317373_1301744169467.jpg" width="255" alt="麦乐团总动员" />
							</a>
						</li>
					</ul>
					<!--<a href="activities" target="_blank">
						查看更多活动
					</a>-->
				</div>
			</div>
		</div>
	</div>
	
</div> <!-- bdw end -->

<div id="back2top">
</div>
<script type="text/javascript">
	function fixback2top(){
		if ($(window).scrollTop() > 0){
			$("#back2top").show();
		} else{
			$("#back2top").hide();
		}
	};
	function back2topInit(){
		fixback2top();
		$(window).scroll(fixback2top);
		$("#back2top").click(function(){
			$(window).scrollTop(0);
		}).css("left", $("#main-outer").offset().left + $("#main-outer").width() + 5);
	}
	// 加载执行
	try {
		window.attachEvent("onload", back2topInit);
	} catch(e) {
		window.addEventListener("load", back2topInit, false);
	}
</script>

<!--{include footer}-->